home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_elisp-manual-21.idb / usr / freeware / info / elisp-31.z / elisp-31
Text File  |  2002-07-08  |  50KB  |  1,137 lines

  1. This is elisp, produced by makeinfo version 4.0f from ./elisp.texi.
  2.  
  3. INFO-DIR-SECTION Editors
  4. START-INFO-DIR-ENTRY
  5. * Elisp: (elisp).    The Emacs Lisp Reference Manual.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    This Info file contains edition 2.8 of the GNU Emacs Lisp Reference
  9. Manual, corresponding to Emacs version 21.2.
  10.  
  11.    Published by the Free Software Foundation 59 Temple Place, Suite 330
  12. Boston, MA  02111-1307  USA
  13.  
  14.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
  15. 2000, 2001, 2002 Free Software Foundation, Inc.
  16.  
  17.    Permission is granted to copy, distribute and/or modify this document
  18. under the terms of the GNU Free Documentation License, Version 1.1 or
  19. any later version published by the Free Software Foundation; with the
  20. Invariant Sections being "Copying", with the Front-Cover texts being "A
  21. GNU Manual", and with the Back-Cover Texts as in (a) below.  A copy of
  22. the license is included in the section entitled "GNU Free Documentation
  23. License".
  24.  
  25.    (a) The FSF's Back-Cover Text is: "You have freedom to copy and
  26. modify this GNU Manual, like GNU software.  Copies published by the Free
  27. Software Foundation raise funds for GNU development."
  28.  
  29. 
  30. File: elisp,  Node: Comparing Text,  Next: Insertion,  Prev: Buffer Contents,  Up: Text
  31.  
  32. Comparing Text
  33. ==============
  34.  
  35.    This function lets you compare portions of the text in a buffer,
  36. without copying them into strings first.
  37.  
  38.  - Function: compare-buffer-substrings buffer1 start1 end1 buffer2
  39.           start2 end2
  40.      This function lets you compare two substrings of the same buffer
  41.      or two different buffers.  The first three arguments specify one
  42.      substring, giving a buffer and two positions within the buffer.
  43.      The last three arguments specify the other substring in the same
  44.      way.  You can use `nil' for BUFFER1, BUFFER2, or both to stand for
  45.      the current buffer.
  46.  
  47.      The value is negative if the first substring is less, positive if
  48.      the first is greater, and zero if they are equal.  The absolute
  49.      value of the result is one plus the index of the first differing
  50.      characters within the substrings.
  51.  
  52.      This function ignores case when comparing characters if
  53.      `case-fold-search' is non-`nil'.  It always ignores text
  54.      properties.
  55.  
  56.      Suppose the current buffer contains the text `foobarbar
  57.      haha!rara!'; then in this example the two substrings are `rbar '
  58.      and `rara!'.  The value is 2 because the first substring is greater
  59.      at the second character.
  60.  
  61.           (compare-buffer-substrings nil 6 11 nil 16 21)
  62.                => 2
  63.  
  64. 
  65. File: elisp,  Node: Insertion,  Next: Commands for Insertion,  Prev: Comparing Text,  Up: Text
  66.  
  67. Inserting Text
  68. ==============
  69.  
  70.    "Insertion" means adding new text to a buffer.  The inserted text
  71. goes at point--between the character before point and the character
  72. after point.  Some insertion functions leave point before the inserted
  73. text, while other functions leave it after.  We call the former
  74. insertion "after point" and the latter insertion "before point".
  75.  
  76.    Insertion relocates markers that point at positions after the
  77. insertion point, so that they stay with the surrounding text (*note
  78. Markers::).  When a marker points at the place of insertion, insertion
  79. may or may not relocate the marker, depending on the marker's insertion
  80. type (*note Marker Insertion Types::).  Certain special functions such
  81. as `insert-before-markers' relocate all such markers to point after the
  82. inserted text, regardless of the markers' insertion type.
  83.  
  84.    Insertion functions signal an error if the current buffer is
  85. read-only or if they insert within read-only text.
  86.  
  87.    These functions copy text characters from strings and buffers along
  88. with their properties.  The inserted characters have exactly the same
  89. properties as the characters they were copied from.  By contrast,
  90. characters specified as separate arguments, not part of a string or
  91. buffer, inherit their text properties from the neighboring text.
  92.  
  93.    The insertion functions convert text from unibyte to multibyte in
  94. order to insert in a multibyte buffer, and vice versa--if the text
  95. comes from a string or from a buffer.  However, they do not convert
  96. unibyte character codes 128 through 255 to multibyte characters, not
  97. even if the current buffer is a multibyte buffer.  *Note Converting
  98. Representations::.
  99.  
  100.  - Function: insert &rest args
  101.      This function inserts the strings and/or characters ARGS into the
  102.      current buffer, at point, moving point forward.  In other words, it
  103.      inserts the text before point.  An error is signaled unless all
  104.      ARGS are either strings or characters.  The value is `nil'.
  105.  
  106.  - Function: insert-before-markers &rest args
  107.      This function inserts the strings and/or characters ARGS into the
  108.      current buffer, at point, moving point forward.  An error is
  109.      signaled unless all ARGS are either strings or characters.  The
  110.      value is `nil'.
  111.  
  112.      This function is unlike the other insertion functions in that it
  113.      relocates markers initially pointing at the insertion point, to
  114.      point after the inserted text.  If an overlay begins the insertion
  115.      point, the inserted text falls outside the overlay; if a nonempty
  116.      overlay ends at the insertion point, the inserted text falls
  117.      inside that overlay.
  118.  
  119.  - Function: insert-char character &optional count inherit
  120.      This function inserts COUNT instances of CHARACTER into the
  121.      current buffer before point.  The argument COUNT should be a
  122.      number (`nil' means 1), and CHARACTER must be a character.  The
  123.      value is `nil'.
  124.  
  125.      This function does not convert unibyte character codes 128 through
  126.      255 to multibyte characters, not even if the current buffer is a
  127.      multibyte buffer.  *Note Converting Representations::.
  128.  
  129.      If INHERIT is non-`nil', then the inserted characters inherit
  130.      sticky text properties from the two characters before and after the
  131.      insertion point.  *Note Sticky Properties::.
  132.  
  133.  - Function: insert-buffer-substring from-buffer-or-name &optional
  134.           start end
  135.      This function inserts a portion of buffer FROM-BUFFER-OR-NAME
  136.      (which must already exist) into the current buffer before point.
  137.      The text inserted is the region from START and END.  (These
  138.      arguments default to the beginning and end of the accessible
  139.      portion of that buffer.)  This function returns `nil'.
  140.  
  141.      In this example, the form is executed with buffer `bar' as the
  142.      current buffer.  We assume that buffer `bar' is initially empty.
  143.  
  144.           ---------- Buffer: foo ----------
  145.           We hold these truths to be self-evident, that all
  146.           ---------- Buffer: foo ----------
  147.           
  148.           (insert-buffer-substring "foo" 1 20)
  149.                => nil
  150.           
  151.           ---------- Buffer: bar ----------
  152.           We hold these truth-!-
  153.           ---------- Buffer: bar ----------
  154.  
  155.    *Note Sticky Properties::, for other insertion functions that inherit
  156. text properties from the nearby text in addition to inserting it.
  157. Whitespace inserted by indentation functions also inherits text
  158. properties.
  159.  
  160. 
  161. File: elisp,  Node: Commands for Insertion,  Next: Deletion,  Prev: Insertion,  Up: Text
  162.  
  163. User-Level Insertion Commands
  164. =============================
  165.  
  166.    This section describes higher-level commands for inserting text,
  167. commands intended primarily for the user but useful also in Lisp
  168. programs.
  169.  
  170.  - Command: insert-buffer from-buffer-or-name
  171.      This command inserts the entire contents of FROM-BUFFER-OR-NAME
  172.      (which must exist) into the current buffer after point.  It leaves
  173.      the mark after the inserted text.  The value is `nil'.
  174.  
  175.  - Command: self-insert-command count
  176.      This command inserts the last character typed; it does so COUNT
  177.      times, before point, and returns `nil'.  Most printing characters
  178.      are bound to this command.  In routine use, `self-insert-command'
  179.      is the most frequently called function in Emacs, but programs
  180.      rarely use it except to install it on a keymap.
  181.  
  182.      In an interactive call, COUNT is the numeric prefix argument.
  183.  
  184.      This command calls `auto-fill-function' whenever that is non-`nil'
  185.      and the character inserted is in the table `auto-fill-chars'
  186.      (*note Auto Filling::).
  187.  
  188.      This command performs abbrev expansion if Abbrev mode is enabled
  189.      and the inserted character does not have word-constituent syntax.
  190.      (*Note Abbrevs::, and *Note Syntax Class Table::.)
  191.  
  192.      This is also responsible for calling `blink-paren-function' when
  193.      the inserted character has close parenthesis syntax (*note
  194.      Blinking::).
  195.  
  196.      Do not try substituting your own definition of
  197.      `self-insert-command' for the standard one.  The editor command
  198.      loop handles this function specially.
  199.  
  200.  - Command: newline &optional number-of-newlines
  201.      This command inserts newlines into the current buffer before point.
  202.      If NUMBER-OF-NEWLINES is supplied, that many newline characters
  203.      are inserted.
  204.  
  205.      This function calls `auto-fill-function' if the current column
  206.      number is greater than the value of `fill-column' and
  207.      NUMBER-OF-NEWLINES is `nil'.  Typically what `auto-fill-function'
  208.      does is insert a newline; thus, the overall result in this case is
  209.      to insert two newlines at different places: one at point, and
  210.      another earlier in the line.  `newline' does not auto-fill if
  211.      NUMBER-OF-NEWLINES is non-`nil'.
  212.  
  213.      This command indents to the left margin if that is not zero.
  214.      *Note Margins::.
  215.  
  216.      The value returned is `nil'.  In an interactive call, COUNT is the
  217.      numeric prefix argument.
  218.  
  219.  - Command: split-line
  220.      This command splits the current line, moving the portion of the
  221.      line after point down vertically so that it is on the next line
  222.      directly below where it was before.  Whitespace is inserted as
  223.      needed at the beginning of the lower line, using the `indent-to'
  224.      function.  `split-line' returns the position of point.
  225.  
  226.      Programs hardly ever use this function.
  227.  
  228.  - Variable: overwrite-mode
  229.      This variable controls whether overwrite mode is in effect.  The
  230.      value should be `overwrite-mode-textual', `overwrite-mode-binary',
  231.      or `nil'.  `overwrite-mode-textual' specifies textual overwrite
  232.      mode (treats newlines and tabs specially), and
  233.      `overwrite-mode-binary' specifies binary overwrite mode (treats
  234.      newlines and tabs like any other characters).
  235.  
  236. 
  237. File: elisp,  Node: Deletion,  Next: User-Level Deletion,  Prev: Commands for Insertion,  Up: Text
  238.  
  239. Deleting Text
  240. =============
  241.  
  242.    Deletion means removing part of the text in a buffer, without saving
  243. it in the kill ring (*note The Kill Ring::).  Deleted text can't be
  244. yanked, but can be reinserted using the undo mechanism (*note Undo::).
  245. Some deletion functions do save text in the kill ring in some special
  246. cases.
  247.  
  248.    All of the deletion functions operate on the current buffer, and all
  249. return a value of `nil'.
  250.  
  251.  - Command: erase-buffer
  252.      This function deletes the entire text of the current buffer,
  253.      leaving it empty.  If the buffer is read-only, it signals a
  254.      `buffer-read-only' error; if some of the text in it is read-only,
  255.      it signals a `text-read-only' error.  Otherwise, it deletes the
  256.      text without asking for any confirmation.  It returns `nil'.
  257.  
  258.      Normally, deleting a large amount of text from a buffer inhibits
  259.      further auto-saving of that buffer "because it has shrunk".
  260.      However, `erase-buffer' does not do this, the idea being that the
  261.      future text is not really related to the former text, and its size
  262.      should not be compared with that of the former text.
  263.  
  264.  - Command: delete-region start end
  265.      This command deletes the text between positions START and END in
  266.      the current buffer, and returns `nil'.  If point was inside the
  267.      deleted region, its value afterward is START.  Otherwise, point
  268.      relocates with the surrounding text, as markers do.
  269.  
  270.  - Function: delete-and-extract-region start end
  271.      This function deletes the text between positions START and END in
  272.      the current buffer, and returns a string containing the text just
  273.      deleted.
  274.  
  275.      If point was inside the deleted region, its value afterward is
  276.      START.  Otherwise, point relocates with the surrounding text, as
  277.      markers do.
  278.  
  279.  - Command: delete-char count &optional killp
  280.      This command deletes COUNT characters directly after point, or
  281.      before point if COUNT is negative.  If KILLP is non-`nil', then it
  282.      saves the deleted characters in the kill ring.
  283.  
  284.      In an interactive call, COUNT is the numeric prefix argument, and
  285.      KILLP is the unprocessed prefix argument.  Therefore, if a prefix
  286.      argument is supplied, the text is saved in the kill ring.  If no
  287.      prefix argument is supplied, then one character is deleted, but
  288.      not saved in the kill ring.
  289.  
  290.      The value returned is always `nil'.
  291.  
  292.  - Command: delete-backward-char count &optional killp
  293.      This command deletes COUNT characters directly before point, or
  294.      after point if COUNT is negative.  If KILLP is non-`nil', then it
  295.      saves the deleted characters in the kill ring.
  296.  
  297.      In an interactive call, COUNT is the numeric prefix argument, and
  298.      KILLP is the unprocessed prefix argument.  Therefore, if a prefix
  299.      argument is supplied, the text is saved in the kill ring.  If no
  300.      prefix argument is supplied, then one character is deleted, but
  301.      not saved in the kill ring.
  302.  
  303.      The value returned is always `nil'.
  304.  
  305.  - Command: backward-delete-char-untabify count &optional killp
  306.      This command deletes COUNT characters backward, changing tabs into
  307.      spaces.  When the next character to be deleted is a tab, it is
  308.      first replaced with the proper number of spaces to preserve
  309.      alignment and then one of those spaces is deleted instead of the
  310.      tab.  If KILLP is non-`nil', then the command saves the deleted
  311.      characters in the kill ring.
  312.  
  313.      Conversion of tabs to spaces happens only if COUNT is positive.
  314.      If it is negative, exactly -COUNT characters after point are
  315.      deleted.
  316.  
  317.      In an interactive call, COUNT is the numeric prefix argument, and
  318.      KILLP is the unprocessed prefix argument.  Therefore, if a prefix
  319.      argument is supplied, the text is saved in the kill ring.  If no
  320.      prefix argument is supplied, then one character is deleted, but
  321.      not saved in the kill ring.
  322.  
  323.      The value returned is always `nil'.
  324.  
  325.  - User Option: backward-delete-char-untabify-method
  326.      This option specifies how `backward-delete-char-untabify' should
  327.      deal with whitespace.  Possible values include `untabify', the
  328.      default, meaning convert a tab to many spaces and delete one;
  329.      `hungry', meaning delete all the whitespace characters before point
  330.      with one command, and `nil', meaning do nothing special for
  331.      whitespace characters.
  332.  
  333. 
  334. File: elisp,  Node: User-Level Deletion,  Next: The Kill Ring,  Prev: Deletion,  Up: Text
  335.  
  336. User-Level Deletion Commands
  337. ============================
  338.  
  339.    This section describes higher-level commands for deleting text,
  340. commands intended primarily for the user but useful also in Lisp
  341. programs.
  342.  
  343.  - Command: delete-horizontal-space
  344.      This function deletes all spaces and tabs around point.  It returns
  345.      `nil'.
  346.  
  347.      In the following examples, we call `delete-horizontal-space' four
  348.      times, once on each line, with point between the second and third
  349.      characters on the line each time.
  350.  
  351.           ---------- Buffer: foo ----------
  352.           I -!-thought
  353.           I -!-     thought
  354.           We-!- thought
  355.           Yo-!-u thought
  356.           ---------- Buffer: foo ----------
  357.           
  358.           (delete-horizontal-space)   ; Four times.
  359.                => nil
  360.           
  361.           ---------- Buffer: foo ----------
  362.           Ithought
  363.           Ithought
  364.           Wethought
  365.           You thought
  366.           ---------- Buffer: foo ----------
  367.  
  368.  - Command: delete-indentation &optional join-following-p
  369.      This function joins the line point is on to the previous line,
  370.      deleting any whitespace at the join and in some cases replacing it
  371.      with one space.  If JOIN-FOLLOWING-P is non-`nil',
  372.      `delete-indentation' joins this line to the following line
  373.      instead.  The function returns `nil'.
  374.  
  375.      If there is a fill prefix, and the second of the lines being joined
  376.      starts with the prefix, then `delete-indentation' deletes the fill
  377.      prefix before joining the lines.  *Note Margins::.
  378.  
  379.      In the example below, point is located on the line starting
  380.      `events', and it makes no difference if there are trailing spaces
  381.      in the preceding line.
  382.  
  383.           ---------- Buffer: foo ----------
  384.           When in the course of human
  385.           -!-    events, it becomes necessary
  386.           ---------- Buffer: foo ----------
  387.           
  388.           (delete-indentation)
  389.                => nil
  390.           
  391.           ---------- Buffer: foo ----------
  392.           When in the course of human-!- events, it becomes necessary
  393.           ---------- Buffer: foo ----------
  394.  
  395.      After the lines are joined, the function `fixup-whitespace' is
  396.      responsible for deciding whether to leave a space at the junction.
  397.  
  398.  - Function: fixup-whitespace
  399.      This function replaces all the whitespace surrounding point with
  400.      either one space or no space, according to the context.  It
  401.      returns `nil'.
  402.  
  403.      At the beginning or end of a line, the appropriate amount of space
  404.      is none.  Before a character with close parenthesis syntax, or
  405.      after a character with open parenthesis or expression-prefix
  406.      syntax, no space is also appropriate.  Otherwise, one space is
  407.      appropriate.  *Note Syntax Class Table::.
  408.  
  409.      In the example below, `fixup-whitespace' is called the first time
  410.      with point before the word `spaces' in the first line.  For the
  411.      second invocation, point is directly after the `('.
  412.  
  413.           ---------- Buffer: foo ----------
  414.           This has too many     -!-spaces
  415.           This has too many spaces at the start of (-!-   this list)
  416.           ---------- Buffer: foo ----------
  417.           
  418.           (fixup-whitespace)
  419.                => nil
  420.           (fixup-whitespace)
  421.                => nil
  422.           
  423.           ---------- Buffer: foo ----------
  424.           This has too many spaces
  425.           This has too many spaces at the start of (this list)
  426.           ---------- Buffer: foo ----------
  427.  
  428.  - Command: just-one-space
  429.      This command replaces any spaces and tabs around point with a
  430.      single space.  It returns `nil'.
  431.  
  432.  - Command: delete-blank-lines
  433.      This function deletes blank lines surrounding point.  If point is
  434.      on a blank line with one or more blank lines before or after it,
  435.      then all but one of them are deleted.  If point is on an isolated
  436.      blank line, then it is deleted.  If point is on a nonblank line,
  437.      the command deletes all blank lines following it.
  438.  
  439.      A blank line is defined as a line containing only tabs and spaces.
  440.  
  441.      `delete-blank-lines' returns `nil'.
  442.  
  443. 
  444. File: elisp,  Node: The Kill Ring,  Next: Undo,  Prev: User-Level Deletion,  Up: Text
  445.  
  446. The Kill Ring
  447. =============
  448.  
  449.    "Kill functions" delete text like the deletion functions, but save
  450. it so that the user can reinsert it by "yanking".  Most of these
  451. functions have `kill-' in their name.  By contrast, the functions whose
  452. names start with `delete-' normally do not save text for yanking
  453. (though they can still be undone); these are "deletion" functions.
  454.  
  455.    Most of the kill commands are primarily for interactive use, and are
  456. not described here.  What we do describe are the functions provided for
  457. use in writing such commands.  You can use these functions to write
  458. commands for killing text.  When you need to delete text for internal
  459. purposes within a Lisp function, you should normally use deletion
  460. functions, so as not to disturb the kill ring contents.  *Note
  461. Deletion::.
  462.  
  463.    Killed text is saved for later yanking in the "kill ring".  This is
  464. a list that holds a number of recent kills, not just the last text
  465. kill.  We call this a "ring" because yanking treats it as having
  466. elements in a cyclic order.  The list is kept in the variable
  467. `kill-ring', and can be operated on with the usual functions for lists;
  468. there are also specialized functions, described in this section, that
  469. treat it as a ring.
  470.  
  471.    Some people think this use of the word "kill" is unfortunate, since
  472. it refers to operations that specifically _do not_ destroy the entities
  473. "killed".  This is in sharp contrast to ordinary life, in which death
  474. is permanent and "killed" entities do not come back to life.
  475. Therefore, other metaphors have been proposed.  For example, the term
  476. "cut ring" makes sense to people who, in pre-computer days, used
  477. scissors and paste to cut up and rearrange manuscripts.  However, it
  478. would be difficult to change the terminology now.
  479.  
  480. * Menu:
  481.  
  482. * Kill Ring Concepts::     What text looks like in the kill ring.
  483. * Kill Functions::         Functions that kill text.
  484. * Yank Commands::          Commands that access the kill ring.
  485. * Low-Level Kill Ring::       Functions and variables for kill ring access.
  486. * Internals of Kill Ring:: Variables that hold kill-ring data.
  487.  
  488. 
  489. File: elisp,  Node: Kill Ring Concepts,  Next: Kill Functions,  Up: The Kill Ring
  490.  
  491. Kill Ring Concepts
  492. ------------------
  493.  
  494.    The kill ring records killed text as strings in a list, most recent
  495. first.  A short kill ring, for example, might look like this:
  496.  
  497.      ("some text" "a different piece of text" "even older text")
  498.  
  499. When the list reaches `kill-ring-max' entries in length, adding a new
  500. entry automatically deletes the last entry.
  501.  
  502.    When kill commands are interwoven with other commands, each kill
  503. command makes a new entry in the kill ring.  Multiple kill commands in
  504. succession build up a single kill-ring entry, which would be yanked as a
  505. unit; the second and subsequent consecutive kill commands add text to
  506. the entry made by the first one.
  507.  
  508.    For yanking, one entry in the kill ring is designated the "front" of
  509. the ring.  Some yank commands "rotate" the ring by designating a
  510. different element as the "front."  But this virtual rotation doesn't
  511. change the list itself--the most recent entry always comes first in the
  512. list.
  513.  
  514. 
  515. File: elisp,  Node: Kill Functions,  Next: Yank Commands,  Prev: Kill Ring Concepts,  Up: The Kill Ring
  516.  
  517. Functions for Killing
  518. ---------------------
  519.  
  520.    `kill-region' is the usual subroutine for killing text.  Any command
  521. that calls this function is a "kill command" (and should probably have
  522. `kill' in its name).  `kill-region' puts the newly killed text in a new
  523. element at the beginning of the kill ring or adds it to the most recent
  524. element.  It determines automatically (using `last-command') whether
  525. the previous command was a kill command, and if so appends the killed
  526. text to the most recent entry.
  527.  
  528.  - Command: kill-region start end
  529.      This function kills the text in the region defined by START and
  530.      END.  The text is deleted but saved in the kill ring, along with
  531.      its text properties.  The value is always `nil'.
  532.  
  533.      In an interactive call, START and END are point and the mark.
  534.  
  535.      If the buffer or text is read-only, `kill-region' modifies the kill
  536.      ring just the same, then signals an error without modifying the
  537.      buffer.  This is convenient because it lets the user use a series
  538.      of kill commands to copy text from a read-only buffer into the
  539.      kill ring.
  540.  
  541.  - User Option: kill-read-only-ok
  542.      If this option is non-`nil', `kill-region' does not signal an
  543.      error if the buffer or text is read-only.  Instead, it simply
  544.      returns, updating the kill ring but not changing the buffer.
  545.  
  546.  - Command: copy-region-as-kill start end
  547.      This command saves the region defined by START and END on the kill
  548.      ring (including text properties), but does not delete the text
  549.      from the buffer.  It returns `nil'.  It also indicates the extent
  550.      of the text copied by moving the cursor momentarily, or by
  551.      displaying a message in the echo area.
  552.  
  553.      The command does not set `this-command' to `kill-region', so a
  554.      subsequent kill command does not append to the same kill ring
  555.      entry.
  556.  
  557.      Don't call `copy-region-as-kill' in Lisp programs unless you aim to
  558.      support Emacs 18.  For newer Emacs versions, it is better to use
  559.      `kill-new' or `kill-append' instead.  *Note Low-Level Kill Ring::.
  560.  
  561. 
  562. File: elisp,  Node: Yank Commands,  Next: Low-Level Kill Ring,  Prev: Kill Functions,  Up: The Kill Ring
  563.  
  564. Functions for Yanking
  565. ---------------------
  566.  
  567.    "Yanking" means reinserting an entry of previously killed text from
  568. the kill ring.  The text properties are copied too.
  569.  
  570.  - Command: yank &optional arg
  571.      This command inserts before point the text in the first entry in
  572.      the kill ring.  It positions the mark at the beginning of that
  573.      text, and point at the end.
  574.  
  575.      If ARG is a list (which occurs interactively when the user types
  576.      `C-u' with no digits), then `yank' inserts the text as described
  577.      above, but puts point before the yanked text and puts the mark
  578.      after it.
  579.  
  580.      If ARG is a number, then `yank' inserts the ARGth most recently
  581.      killed text--the ARGth element of the kill ring list.
  582.  
  583.      `yank' does not alter the contents of the kill ring or rotate it.
  584.      It returns `nil'.
  585.  
  586.  - Command: yank-pop arg
  587.      This command replaces the just-yanked entry from the kill ring
  588.      with a different entry from the kill ring.
  589.  
  590.      This is allowed only immediately after a `yank' or another
  591.      `yank-pop'.  At such a time, the region contains text that was just
  592.      inserted by yanking.  `yank-pop' deletes that text and inserts in
  593.      its place a different piece of killed text.  It does not add the
  594.      deleted text to the kill ring, since it is already in the kill
  595.      ring somewhere.
  596.  
  597.      If ARG is `nil', then the replacement text is the previous element
  598.      of the kill ring.  If ARG is numeric, the replacement is the ARGth
  599.      previous kill.  If ARG is negative, a more recent kill is the
  600.      replacement.
  601.  
  602.      The sequence of kills in the kill ring wraps around, so that after
  603.      the oldest one comes the newest one, and before the newest one
  604.      goes the oldest.
  605.  
  606.      The return value is always `nil'.
  607.  
  608. 
  609. File: elisp,  Node: Low-Level Kill Ring,  Next: Internals of Kill Ring,  Prev: Yank Commands,  Up: The Kill Ring
  610.  
  611. Low-Level Kill Ring
  612. -------------------
  613.  
  614.    These functions and variables provide access to the kill ring at a
  615. lower level, but still convenient for use in Lisp programs, because they
  616. take care of interaction with window system selections (*note Window
  617. System Selections::).
  618.  
  619.  - Function: current-kill n &optional do-not-move
  620.      The function `current-kill' rotates the yanking pointer, which
  621.      designates the "front" of the kill ring, by N places (from newer
  622.      kills to older ones), and returns the text at that place in the
  623.      ring.
  624.  
  625.      If the optional second argument DO-NOT-MOVE is non-`nil', then
  626.      `current-kill' doesn't alter the yanking pointer; it just returns
  627.      the Nth kill, counting from the current yanking pointer.
  628.  
  629.      If N is zero, indicating a request for the latest kill,
  630.      `current-kill' calls the value of `interprogram-paste-function'
  631.      (documented below) before consulting the kill ring.
  632.  
  633.  - Function: kill-new string
  634.      This function puts the text STRING into the kill ring as a new
  635.      entry at the front of the ring.  It discards the oldest entry if
  636.      appropriate.  It also invokes the value of
  637.      `interprogram-cut-function' (see below).
  638.  
  639.  - Function: kill-append string before-p
  640.      This function appends the text STRING to the first entry in the
  641.      kill ring.  Normally STRING goes at the end of the entry, but if
  642.      BEFORE-P is non-`nil', it goes at the beginning.  This function
  643.      also invokes the value of `interprogram-cut-function' (see below).
  644.  
  645.  - Variable: interprogram-paste-function
  646.      This variable provides a way of transferring killed text from other
  647.      programs, when you are using a window system.  Its value should be
  648.      `nil' or a function of no arguments.
  649.  
  650.      If the value is a function, `current-kill' calls it to get the
  651.      "most recent kill".  If the function returns a non-`nil' value,
  652.      then that value is used as the "most recent kill".  If it returns
  653.      `nil', then the first element of `kill-ring' is used.
  654.  
  655.      The normal use of this hook is to get the window system's primary
  656.      selection as the most recent kill, even if the selection belongs to
  657.      another application.  *Note Window System Selections::.
  658.  
  659.  - Variable: interprogram-cut-function
  660.      This variable provides a way of communicating killed text to other
  661.      programs, when you are using a window system.  Its value should be
  662.      `nil' or a function of one argument.
  663.  
  664.      If the value is a function, `kill-new' and `kill-append' call it
  665.      with the new first element of the kill ring as an argument.
  666.  
  667.      The normal use of this hook is to set the window system's primary
  668.      selection from the newly killed text.  *Note Window System
  669.      Selections::.
  670.  
  671. 
  672. File: elisp,  Node: Internals of Kill Ring,  Prev: Low-Level Kill Ring,  Up: The Kill Ring
  673.  
  674. Internals of the Kill Ring
  675. --------------------------
  676.  
  677.    The variable `kill-ring' holds the kill ring contents, in the form
  678. of a list of strings.  The most recent kill is always at the front of
  679. the list.
  680.  
  681.    The `kill-ring-yank-pointer' variable points to a link in the kill
  682. ring list, whose CAR is the text to yank next.  We say it identifies
  683. the "front" of the ring.  Moving `kill-ring-yank-pointer' to a
  684. different link is called "rotating the kill ring".  We call the kill
  685. ring a "ring" because the functions that move the yank pointer wrap
  686. around from the end of the list to the beginning, or vice-versa.
  687. Rotation of the kill ring is virtual; it does not change the value of
  688. `kill-ring'.
  689.  
  690.    Both `kill-ring' and `kill-ring-yank-pointer' are Lisp variables
  691. whose values are normally lists.  The word "pointer" in the name of the
  692. `kill-ring-yank-pointer' indicates that the variable's purpose is to
  693. identify one element of the list for use by the next yank command.
  694.  
  695.    The value of `kill-ring-yank-pointer' is always `eq' to one of the
  696. links in the kill ring list.  The element it identifies is the CAR of
  697. that link.  Kill commands, which change the kill ring, also set this
  698. variable to the value of `kill-ring'.  The effect is to rotate the ring
  699. so that the newly killed text is at the front.
  700.  
  701.    Here is a diagram that shows the variable `kill-ring-yank-pointer'
  702. pointing to the second entry in the kill ring `("some text" "a
  703. different piece of text" "yet older text")'.
  704.  
  705.      kill-ring                  ---- kill-ring-yank-pointer
  706.        |                       |
  707.        |                       v
  708.        |     --- ---          --- ---      --- ---
  709.         --> |   |   |------> |   |   |--> |   |   |--> nil
  710.              --- ---          --- ---      --- ---
  711.               |                |            |
  712.               |                |            |
  713.               |                |             -->"yet older text"
  714.               |                |
  715.               |                 --> "a different piece of text"
  716.               |
  717.                --> "some text"
  718.  
  719. This state of affairs might occur after `C-y' (`yank') immediately
  720. followed by `M-y' (`yank-pop').
  721.  
  722.  - Variable: kill-ring
  723.      This variable holds the list of killed text sequences, most
  724.      recently killed first.
  725.  
  726.  - Variable: kill-ring-yank-pointer
  727.      This variable's value indicates which element of the kill ring is
  728.      at the "front" of the ring for yanking.  More precisely, the value
  729.      is a tail of the value of `kill-ring', and its CAR is the kill
  730.      string that `C-y' should yank.
  731.  
  732.  - User Option: kill-ring-max
  733.      The value of this variable is the maximum length to which the kill
  734.      ring can grow, before elements are thrown away at the end.  The
  735.      default value for `kill-ring-max' is 30.
  736.  
  737. 
  738. File: elisp,  Node: Undo,  Next: Maintaining Undo,  Prev: The Kill Ring,  Up: Text
  739.  
  740. Undo
  741. ====
  742.  
  743.    Most buffers have an "undo list", which records all changes made to
  744. the buffer's text so that they can be undone.  (The buffers that don't
  745. have one are usually special-purpose buffers for which Emacs assumes
  746. that undoing is not useful.)  All the primitives that modify the text
  747. in the buffer automatically add elements to the front of the undo list,
  748. which is in the variable `buffer-undo-list'.
  749.  
  750.  - Variable: buffer-undo-list
  751.      This variable's value is the undo list of the current buffer.  A
  752.      value of `t' disables the recording of undo information.
  753.  
  754.    Here are the kinds of elements an undo list can have:
  755.  
  756. `POSITION'
  757.      This kind of element records a previous value of point; undoing
  758.      this element moves point to POSITION.  Ordinary cursor motion does
  759.      not make any sort of undo record, but deletion operations use
  760.      these entries to record where point was before the command.
  761.  
  762. `(BEG . END)'
  763.      This kind of element indicates how to delete text that was
  764.      inserted.  Upon insertion, the text occupied the range BEG-END in
  765.      the buffer.
  766.  
  767. `(TEXT . POSITION)'
  768.      This kind of element indicates how to reinsert text that was
  769.      deleted.  The deleted text itself is the string TEXT.  The place to
  770.      reinsert it is `(abs POSITION)'.
  771.  
  772. `(t HIGH . LOW)'
  773.      This kind of element indicates that an unmodified buffer became
  774.      modified.  The elements HIGH and LOW are two integers, each
  775.      recording 16 bits of the visited file's modification time as of
  776.      when it was previously visited or saved.  `primitive-undo' uses
  777.      those values to determine whether to mark the buffer as unmodified
  778.      once again; it does so only if the file's modification time
  779.      matches those numbers.
  780.  
  781. `(nil PROPERTY VALUE BEG . END)'
  782.      This kind of element records a change in a text property.  Here's
  783.      how you might undo the change:
  784.  
  785.           (put-text-property BEG END PROPERTY VALUE)
  786.  
  787. `(MARKER . ADJUSTMENT)'
  788.      This kind of element records the fact that the marker MARKER was
  789.      relocated due to deletion of surrounding text, and that it moved
  790.      ADJUSTMENT character positions.  Undoing this element moves MARKER
  791.      - ADJUSTMENT characters.
  792.  
  793. `nil'
  794.      This element is a boundary.  The elements between two boundaries
  795.      are called a "change group"; normally, each change group
  796.      corresponds to one keyboard command, and undo commands normally
  797.      undo an entire group as a unit.
  798.  
  799.  - Function: undo-boundary
  800.      This function places a boundary element in the undo list.  The undo
  801.      command stops at such a boundary, and successive undo commands undo
  802.      to earlier and earlier boundaries.  This function returns `nil'.
  803.  
  804.      The editor command loop automatically creates an undo boundary
  805.      before each key sequence is executed.  Thus, each undo normally
  806.      undoes the effects of one command.  Self-inserting input
  807.      characters are an exception.  The command loop makes a boundary
  808.      for the first such character; the next 19 consecutive
  809.      self-inserting input characters do not make boundaries, and then
  810.      the 20th does, and so on as long as self-inserting characters
  811.      continue.
  812.  
  813.      All buffer modifications add a boundary whenever the previous
  814.      undoable change was made in some other buffer.  This is to ensure
  815.      that each command makes a boundary in each buffer where it makes
  816.      changes.
  817.  
  818.      Calling this function explicitly is useful for splitting the
  819.      effects of a command into more than one unit.  For example,
  820.      `query-replace' calls `undo-boundary' after each replacement, so
  821.      that the user can undo individual replacements one by one.
  822.  
  823.  - Function: primitive-undo count list
  824.      This is the basic function for undoing elements of an undo list.
  825.      It undoes the first COUNT elements of LIST, returning the rest of
  826.      LIST.  You could write this function in Lisp, but it is convenient
  827.      to have it in C.
  828.  
  829.      `primitive-undo' adds elements to the buffer's undo list when it
  830.      changes the buffer.  Undo commands avoid confusion by saving the
  831.      undo list value at the beginning of a sequence of undo operations.
  832.      Then the undo operations use and update the saved value.  The new
  833.      elements added by undoing are not part of this saved value, so
  834.      they don't interfere with continuing to undo.
  835.  
  836. 
  837. File: elisp,  Node: Maintaining Undo,  Next: Filling,  Prev: Undo,  Up: Text
  838.  
  839. Maintaining Undo Lists
  840. ======================
  841.  
  842.    This section describes how to enable and disable undo information for
  843. a given buffer.  It also explains how the undo list is truncated
  844. automatically so it doesn't get too big.
  845.  
  846.    Recording of undo information in a newly created buffer is normally
  847. enabled to start with; but if the buffer name starts with a space, the
  848. undo recording is initially disabled.  You can explicitly enable or
  849. disable undo recording with the following two functions, or by setting
  850. `buffer-undo-list' yourself.
  851.  
  852.  - Command: buffer-enable-undo &optional buffer-or-name
  853.      This command enables recording undo information for buffer
  854.      BUFFER-OR-NAME, so that subsequent changes can be undone.  If no
  855.      argument is supplied, then the current buffer is used.  This
  856.      function does nothing if undo recording is already enabled in the
  857.      buffer.  It returns `nil'.
  858.  
  859.      In an interactive call, BUFFER-OR-NAME is the current buffer.  You
  860.      cannot specify any other buffer.
  861.  
  862.  - Command: buffer-disable-undo &optional buffer
  863.  - Command: buffer-flush-undo &optional buffer
  864.      This function discards the undo list of BUFFER, and disables
  865.      further recording of undo information.  As a result, it is no
  866.      longer possible to undo either previous changes or any subsequent
  867.      changes.  If the undo list of BUFFER is already disabled, this
  868.      function has no effect.
  869.  
  870.      This function returns `nil'.
  871.  
  872.      The name `buffer-flush-undo' is not considered obsolete, but the
  873.      preferred name is `buffer-disable-undo'.
  874.  
  875.    As editing continues, undo lists get longer and longer.  To prevent
  876. them from using up all available memory space, garbage collection trims
  877. them back to size limits you can set.  (For this purpose, the "size" of
  878. an undo list measures the cons cells that make up the list, plus the
  879. strings of deleted text.)  Two variables control the range of acceptable
  880. sizes: `undo-limit' and `undo-strong-limit'.
  881.  
  882.  - Variable: undo-limit
  883.      This is the soft limit for the acceptable size of an undo list.
  884.      The change group at which this size is exceeded is the last one
  885.      kept.
  886.  
  887.  - Variable: undo-strong-limit
  888.      This is the upper limit for the acceptable size of an undo list.
  889.      The change group at which this size is exceeded is discarded
  890.      itself (along with all older change groups).  There is one
  891.      exception: the very latest change group is never discarded no
  892.      matter how big it is.
  893.  
  894. 
  895. File: elisp,  Node: Filling,  Next: Margins,  Prev: Maintaining Undo,  Up: Text
  896.  
  897. Filling
  898. =======
  899.  
  900.    "Filling" means adjusting the lengths of lines (by moving the line
  901. breaks) so that they are nearly (but no greater than) a specified
  902. maximum width.  Additionally, lines can be "justified", which means
  903. inserting spaces to make the left and/or right margins line up
  904. precisely.  The width is controlled by the variable `fill-column'.  For
  905. ease of reading, lines should be no longer than 70 or so columns.
  906.  
  907.    You can use Auto Fill mode (*note Auto Filling::) to fill text
  908. automatically as you insert it, but changes to existing text may leave
  909. it improperly filled.  Then you must fill the text explicitly.
  910.  
  911.    Most of the commands in this section return values that are not
  912. meaningful.  All the functions that do filling take note of the current
  913. left margin, current right margin, and current justification style
  914. (*note Margins::).  If the current justification style is `none', the
  915. filling functions don't actually do anything.
  916.  
  917.    Several of the filling functions have an argument JUSTIFY.  If it is
  918. non-`nil', that requests some kind of justification.  It can be `left',
  919. `right', `full', or `center', to request a specific style of
  920. justification.  If it is `t', that means to use the current
  921. justification style for this part of the text (see
  922. `current-justification', below).  Any other value is treated as `full'.
  923.  
  924.    When you call the filling functions interactively, using a prefix
  925. argument implies the value `full' for JUSTIFY.
  926.  
  927.  - Command: fill-paragraph justify
  928.      This command fills the paragraph at or after point.  If JUSTIFY is
  929.      non-`nil', each line is justified as well.  It uses the ordinary
  930.      paragraph motion commands to find paragraph boundaries.  *Note
  931.      Paragraphs: (emacs)Paragraphs.
  932.  
  933.  - Command: fill-region start end &optional justify nosqueeze to-eop
  934.      This command fills each of the paragraphs in the region from START
  935.      to END.  It justifies as well if JUSTIFY is non-`nil'.
  936.  
  937.      If NOSQUEEZE is non-`nil', that means to leave whitespace other
  938.      than line breaks untouched.  If TO-EOP is non-`nil', that means to
  939.      keep filling to the end of the paragraph--or the next hard
  940.      newline, if `use-hard-newlines' is enabled (see below).
  941.  
  942.      The variable `paragraph-separate' controls how to distinguish
  943.      paragraphs.  *Note Standard Regexps::.
  944.  
  945.  - Command: fill-individual-paragraphs start end &optional justify
  946.           citation-regexp
  947.      This command fills each paragraph in the region according to its
  948.      individual fill prefix.  Thus, if the lines of a paragraph were
  949.      indented with spaces, the filled paragraph will remain indented in
  950.      the same fashion.
  951.  
  952.      The first two arguments, START and END, are the beginning and end
  953.      of the region to be filled.  The third and fourth arguments,
  954.      JUSTIFY and CITATION-REGEXP, are optional.  If JUSTIFY is
  955.      non-`nil', the paragraphs are justified as well as filled.  If
  956.      CITATION-REGEXP is non-`nil', it means the function is operating
  957.      on a mail message and therefore should not fill the header lines.
  958.      If CITATION-REGEXP is a string, it is used as a regular
  959.      expression; if it matches the beginning of a line, that line is
  960.      treated as a citation marker.
  961.  
  962.      Ordinarily, `fill-individual-paragraphs' regards each change in
  963.      indentation as starting a new paragraph.  If
  964.      `fill-individual-varying-indent' is non-`nil', then only separator
  965.      lines separate paragraphs.  That mode can handle indented
  966.      paragraphs with additional indentation on the first line.
  967.  
  968.  - User Option: fill-individual-varying-indent
  969.      This variable alters the action of `fill-individual-paragraphs' as
  970.      described above.
  971.  
  972.  - Command: fill-region-as-paragraph start end &optional justify
  973.           nosqueeze squeeze-after
  974.      This command considers a region of text as a single paragraph and
  975.      fills it.  If the region was made up of many paragraphs, the blank
  976.      lines between paragraphs are removed.  This function justifies as
  977.      well as filling when JUSTIFY is non-`nil'.
  978.  
  979.      In an interactive call, any prefix argument requests justification.
  980.  
  981.      If NOSQUEEZE is non-`nil', that means to leave whitespace other
  982.      than line breaks untouched.  If SQUEEZE-AFTER is non-`nil', it
  983.      specifies a position in the region, and means don't canonicalize
  984.      spaces before that position.
  985.  
  986.      In Adaptive Fill mode, this command calls `fill-context-prefix' to
  987.      choose a fill prefix by default.  *Note Adaptive Fill::.
  988.  
  989.  - Command: justify-current-line &optional how eop nosqueeze
  990.      This command inserts spaces between the words of the current line
  991.      so that the line ends exactly at `fill-column'.  It returns `nil'.
  992.  
  993.      The argument HOW, if non-`nil' specifies explicitly the style of
  994.      justification.  It can be `left', `right', `full', `center', or
  995.      `none'.  If it is `t', that means to do follow specified
  996.      justification style (see `current-justification', below).  `nil'
  997.      means to do full justification.
  998.  
  999.      If EOP is non-`nil', that means do left-justification if
  1000.      `current-justification' specifies full justification.  This is used
  1001.      for the last line of a paragraph; even if the paragraph as a whole
  1002.      is fully justified, the last line should not be.
  1003.  
  1004.      If NOSQUEEZE is non-`nil', that means do not change interior
  1005.      whitespace.
  1006.  
  1007.  - User Option: default-justification
  1008.      This variable's value specifies the style of justification to use
  1009.      for text that doesn't specify a style with a text property.  The
  1010.      possible values are `left', `right', `full', `center', or `none'.
  1011.      The default value is `left'.
  1012.  
  1013.  - Function: current-justification
  1014.      This function returns the proper justification style to use for
  1015.      filling the text around point.
  1016.  
  1017.  - User Option: sentence-end-double-space
  1018.      If this variable is non-`nil', a period followed by just one space
  1019.      does not count as the end of a sentence, and the filling functions
  1020.      avoid breaking the line at such a place.
  1021.  
  1022.  - Variable: fill-paragraph-function
  1023.      This variable provides a way for major modes to override the
  1024.      filling of paragraphs.  If the value is non-`nil',
  1025.      `fill-paragraph' calls this function to do the work.  If the
  1026.      function returns a non-`nil' value, `fill-paragraph' assumes the
  1027.      job is done, and immediately returns that value.
  1028.  
  1029.      The usual use of this feature is to fill comments in programming
  1030.      language modes.  If the function needs to fill a paragraph in the
  1031.      usual way, it can do so as follows:
  1032.  
  1033.           (let ((fill-paragraph-function nil))
  1034.             (fill-paragraph arg))
  1035.  
  1036.  - Variable: use-hard-newlines
  1037.      If this variable is non-`nil', the filling functions do not delete
  1038.      newlines that have the `hard' text property.  These "hard
  1039.      newlines" act as paragraph separators.
  1040.  
  1041. 
  1042. File: elisp,  Node: Margins,  Next: Adaptive Fill,  Prev: Filling,  Up: Text
  1043.  
  1044. Margins for Filling
  1045. ===================
  1046.  
  1047.  - User Option: fill-prefix
  1048.      This buffer-local variable specifies a string of text that appears
  1049.      at the beginning of normal text lines and should be disregarded
  1050.      when filling them.  Any line that fails to start with the fill
  1051.      prefix is considered the start of a paragraph; so is any line that
  1052.      starts with the fill prefix followed by additional whitespace.
  1053.      Lines that start with the fill prefix but no additional whitespace
  1054.      are ordinary text lines that can be filled together.  The
  1055.      resulting filled lines also start with the fill prefix.
  1056.  
  1057.      The fill prefix follows the left margin whitespace, if any.
  1058.  
  1059.  - User Option: fill-column
  1060.      This buffer-local variable specifies the maximum width of filled
  1061.      lines.  Its value should be an integer, which is a number of
  1062.      columns.  All the filling, justification, and centering commands
  1063.      are affected by this variable, including Auto Fill mode (*note
  1064.      Auto Filling::).
  1065.  
  1066.      As a practical matter, if you are writing text for other people to
  1067.      read, you should set `fill-column' to no more than 70.  Otherwise
  1068.      the line will be too long for people to read comfortably, and this
  1069.      can make the text seem clumsy.
  1070.  
  1071.  - Variable: default-fill-column
  1072.      The value of this variable is the default value for `fill-column'
  1073.      in buffers that do not override it.  This is the same as
  1074.      `(default-value 'fill-column)'.
  1075.  
  1076.      The default value for `default-fill-column' is 70.
  1077.  
  1078.  - Command: set-left-margin from to margin
  1079.      This sets the `left-margin' property on the text from FROM to TO
  1080.      to the value MARGIN.  If Auto Fill mode is enabled, this command
  1081.      also refills the region to fit the new margin.
  1082.  
  1083.  - Command: set-right-margin from to margin
  1084.      This sets the `right-margin' property on the text from FROM to TO
  1085.      to the value MARGIN.  If Auto Fill mode is enabled, this command
  1086.      also refills the region to fit the new margin.
  1087.  
  1088.  - Function: current-left-margin
  1089.      This function returns the proper left margin value to use for
  1090.      filling the text around point.  The value is the sum of the
  1091.      `left-margin' property of the character at the start of the
  1092.      current line (or zero if none), and the value of the variable
  1093.      `left-margin'.
  1094.  
  1095.  - Function: current-fill-column
  1096.      This function returns the proper fill column value to use for
  1097.      filling the text around point.  The value is the value of the
  1098.      `fill-column' variable, minus the value of the `right-margin'
  1099.      property of the character after point.
  1100.  
  1101.  - Command: move-to-left-margin &optional n force
  1102.      This function moves point to the left margin of the current line.
  1103.      The column moved to is determined by calling the function
  1104.      `current-left-margin'.  If the argument N is non-`nil',
  1105.      `move-to-left-margin' moves forward N-1 lines first.
  1106.  
  1107.      If FORCE is non-`nil', that says to fix the line's indentation if
  1108.      that doesn't match the left margin value.
  1109.  
  1110.  - Function: delete-to-left-margin &optional from to
  1111.      This function removes left margin indentation from the text between
  1112.      FROM and TO.  The amount of indentation to delete is determined by
  1113.      calling `current-left-margin'.  In no case does this function
  1114.      delete non-whitespace.  If FROM and TO are omitted, they default
  1115.      to the whole buffer.
  1116.  
  1117.  - Function: indent-to-left-margin
  1118.      This is the default `indent-line-function', used in Fundamental
  1119.      mode, Text mode, etc.  Its effect is to adjust the indentation at
  1120.      the beginning of the current line to the value specified by the
  1121.      variable `left-margin'.  This may involve either inserting or
  1122.      deleting whitespace.
  1123.  
  1124.  - Variable: left-margin
  1125.      This variable specifies the base left margin column.  In
  1126.      Fundamental mode, `C-j' indents to this column.  This variable
  1127.      automatically becomes buffer-local when set in any fashion.
  1128.  
  1129.  - Variable: fill-nobreak-predicate
  1130.      This variable gives major modes a way to specify not to break a
  1131.      line at certain places.  Its value should be a function.  This
  1132.      function is called during filling, with no arguments and with
  1133.      point located at the place where a break is being considered.  If
  1134.      the function returns non-`nil', then the line won't be broken
  1135.      there.
  1136.  
  1137.